home *** CD-ROM | disk | FTP | other *** search
/ Die Ultimative Software-P…i Collection 1996 & 1997 / Die Ultimative Software-Pakete CD-ROM fur Atari Collection 1996 & 1997.iso / g / gnu_c / gempp19.zoo / gem++19 / src / gemm.cc < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-28  |  1.1 KB  |  50 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. //  This file is Copyright 1992,1993 by Warwick W. Allison.
  4. //  This file is part of the gem++ library.
  5. //  You are free to copy and modify these sources, provided you acknowledge
  6. //  the origin by retaining this notice, and adhere to the conditions
  7. //  described in the file COPYING.LIB.
  8. //
  9. /////////////////////////////////////////////////////////////////////////////
  10.  
  11. #include <aesbind.h>
  12. #include "gemm.h"
  13. #include "gema.h"
  14. #include "geme.h"
  15. #include "gemo.h"
  16.  
  17. GEMmenu::GEMmenu(GEMactivity& in, const GEMrsc& rsc, int RSCindex) :
  18.     GEMform(rsc, RSCindex),
  19.     act(in)
  20. {
  21.     act.SetMenu(this);
  22. }
  23.  
  24. GEMmenu::~GEMmenu()
  25. {
  26.     act.SetMenu(0);
  27. }
  28.  
  29. void GEMmenu::Show(bool on=TRUE)
  30. {
  31.     menu_bar(Obj,on);
  32. }
  33.  
  34. GEMfeedback GEMmenu::Select(const GEMevent& event)
  35. // Processes Message events.
  36. // Uses GEMobject callback to pass on message.
  37. // If no GEMobject declared in form or callback is ignored, use DoItem()
  38. // to pass on message.
  39. {
  40.     GEMfeedback result=IgnoredClick;
  41.     int heading=event.Message(3);
  42.     int item=event.Message(4);
  43.  
  44.     result=DoItem(item,event);
  45.  
  46.     menu_tnormal(Obj,heading,1);
  47.  
  48.     return result;
  49. }
  50.